<?php
/**
 * 全局父模板
 */
use app\assets\AppAsset;
use yii\helpers\Html;
use yii\helpers\Url;
AppAsset::register($this);
?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html>
<head lang="<?= Yii::$app->language ?>">
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head(); ?>
    <link rel="shortcut icon" type="image/x-icon" href="<?=Url::to('@web/images/toefllogo.ico');?>" />
</head>
<body>
<?php $this->beginBody(); ?>
<div class="top-wrap">
    <div class="nav">
        <div class="row clearfix">
            <div class="col-xs-1 logo"><a href="<?=Url::to('@web/');?>"><img src="<?=Url::to('@web/images/logo1.png');?>" alt="logo"></a></div>
            <div class="col-xs-2 spes hidden-xs">
                <div class="col-xs-6 spe "><a href="<?=Url::to('@web/');?>"><p>练习</p><p>Practice</p></a></div>
                <div class="col-xs-6 spe "><a href="<?=Url::to('@web/?r=communitydiscuss/sq');?>"><p>社区</p><p>Community</p></a></div>
            </div>
            <div class="col-xs-2 pull-right login">
                <?php
                $session=\Yii::$app->session;
                if(!isset($session['user_id'])){?>
                    <div class="col-xs-6 log"><a href="http://www.dianketai.com/user/regWindow"><span>注册</span></a></div>
                    <div class="col-xs-6 log"><a href="<?=Url::to('@web/?r=site/login');?>"><span>登录</span></a></div>
                <?php }else {?>
                    <div class="col-xs-6 log" id="userid"><a href="http://www.dianketai.com/user" title="<?=$session['name'];?>" target="_blank"><span><?=$session['name'];?></span></a></div>
                    <div class="col-xs-6 log"><a href="<?=Url::to('@web/?r=site/logout');?>"><span>注销</span></a></div>
                <?php }?>
            </div>
        </div>

    </div>
</div>
<div class="morex"></div>
<div class="content">
    <?= $content ?>
</div>
<div class="footer">
    <div class="foot-con">
        <div class="dkt-logo"><img src="<?=Url::to('@web/images/dkt.png');?>"></div>
        <div class="foot-link center-block">
            <ul class="list-unstyled clearfix">
                <li class="pull-left"><a href="#">联系我们&nbsp;&nbsp;|</li>
                <li class="pull-left"><a href="#">&nbsp;&nbsp;老师入驻&nbsp;&nbsp;|</a></li>
                <li class="pull-left"><a href="#">&nbsp;&nbsp;人才招聘&nbsp;&nbsp;|</a></li>
                <li class="pull-left"><a href="#">&nbsp;&nbsp;友情链接&nbsp;&nbsp;|</a></li>
                <li class="pull-left"><a href="#">&nbsp;&nbsp;隐私条款&nbsp;&nbsp;|</a></li>
                <li class="pull-left"><a href="#">&nbsp;&nbsp;高校免费直播平台&nbsp;&nbsp;|</a></li>
                <li class="pull-left"><a href="#">&nbsp;&nbsp;手机点课台</a></li>
            </ul>
        </div>
        <div class="copyright center-bolck">
            <a href="#">Copyright © 2015 张艳英语 - 点课台 粤ICP备15052090号</a>
        </div>
    </div>
</div>
<?php $this->endBody(); ?>
</body>
</html>
<?php $this->endPage(); ?>